package com.panopset.flywheel.gui;

import javax.swing.JButton;

import com.panopset.gui.TButton;

/**
 * Enumeration of all commands
 * @author Karl Dinwiddie
 *
 */
public enum Commenum {
    REPLACE('r',"r:Replace","${@r ?}"),
    FILE('f',"f:File","${@f ?}"),
    PUSH('p',"p:Push","${@p ?}?${@q}"),
    LIST('l',"l:List","${@l ?}?${@q}"),
    QUIT('q',"q:Quit","${@q}"),
    TEXT('t',"t:Template","${@t ?}"),
    EXECUTE('e',"e:Execute","${@e ?}");

    /**
     * Script character code associated with a Flywheel command.
     */
    public final char charCode;

    public final String name;

    public final String prototype;

    private Commenum(char charCode, String name, String prototype) {
        this.charCode = charCode;
        this.name = name;
        this.prototype = prototype;
    }

    /**
     * Creates a Flywheel Command wizard button.
     * @return JButton.
     */
    public JButton createButton() {
        TButton rtn = new TButton(name);
        return rtn;
    }

}
